home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / resource / earshot / eardemo.dir / 00404_text printing script.ls < prev    next >
Encoding:
Text File  |  1996-05-17  |  850 b   |  31 lines

  1. on PrintText textString
  2.   if the machineType = 256 then
  3.     set printingFont to "arial"
  4.     set XObjFile to "pmatic.dll"
  5.   else
  6.     set printingFont to "helvetica"
  7.     set XObjFile to "pmatic.xobj"
  8.   end if
  9.   openXLib(XObjFile)
  10.   set printer to PrintOMatic(mnew)
  11.   if not objectp(printer) then
  12.     alert("There is no currently selected printer. Printing features are disabled.")
  13.   else
  14.     printer(mSetMargins, 72, 72, 72, 72)
  15.     set w to printer(mGetPageWidth)
  16.     set h to printer(mgetpageheight)
  17.     printer(mSetTextFont, printingFont)
  18.     printer(mSetTextSize, 10)
  19.     printer(mSetTextStyle, "normal")
  20.     printer(mNewPage)
  21.     printer(mTextBox, 0, 0, w, h, 0)
  22.     printer(mSetText, textString, 1)
  23.     if printer(mDoJobSetup) = 1 then
  24.       updateStage()
  25.       printer(mPrint)
  26.     end if
  27.     printer(mdispose)
  28.   end if
  29.   closeXLib(XObjFile)
  30. end
  31.